import 'dart:ui';

import 'package:distribution_mall_flutter/constant/cf_constant.dart';
import 'package:flutter/material.dart';
import 'package:distribution_mall_flutter/widgets/input_quantity/input_quantity.dart';

class GoodItemSku extends StatelessWidget {
  final String img =
      "https://newnary-1300176682.cos.ap-guangzhou.myqcloud.com/TENANT7941185388049557880832/common/space/20240112/68d09c6c0232a9d58f21039b2debc068.png";
  final bool showLeftIcon;
  final Widget? leftIcon;
  const GoodItemSku({super.key, this.showLeftIcon = false, this.leftIcon});

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Row(
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            Visibility(
                visible: showLeftIcon,
                child: IconButton(
                  padding: const EdgeInsets.only(left: 0),
                  onPressed: () {},
                  icon: leftIcon ?? const Icon(Icons.add),
                )),
            ClipRRect(
                borderRadius: BorderRadius.circular(RadiusConstant.edge10),
                child: Image.network(
                  img,
                  width: 40,
                  height: 40,
                )),
            Expanded(
                child: Container(
              margin: const EdgeInsets.only(left: EdgeConstant.edge10),
              padding: const EdgeInsets.symmetric(
                  horizontal: EdgeConstant.edge10,
                  vertical: EdgeConstant.edge5),
              decoration: const BoxDecoration(
                  borderRadius:
                      BorderRadius.all(Radius.circular(RadiusConstant.edge5)),
                  color: ColorConstant.grey246),
              child: const Text(
                'Panasonic Yuyan series 4L large-capacity rice …',
                style: TextStyle(
                    color: ColorConstant.grey888,
                    fontSize: FontConstant.f12,
                    letterSpacing: 0.3),
                maxLines: 1,
                overflow: TextOverflow.ellipsis,
              ),
            ))
          ],
        ),
        const Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: [
            const Text(
              '96',
              style: TextStyle(
                  color: ColorConstant.cartPrice,
                  fontSize: FontConstant.f18,
                  fontWeight: FontWeight.bold),
            ),
            SizedBox(width: 100, height: 30, child: Text(''))
          ],
        ),
      ],
    );
  }
}
